﻿/****************************************************************************************************************
*                                                                                                               *
* Copyright (C) 2011 5173.com                                                                                   *
* This project may be copied only under the terms of the Apache License 2.0.                                    *
* Please visit the project Home Page http://bqqapicsharp.codeplex.com/ for more detail.                         *
*                                                                                                               *
****************************************************************************************************************/

namespace BQQAPIClient.Core.Business
{
    using System;

    public class AssignKefu
    {
        internal static readonly byte TQQID = 31;
        private uint qqID;
        public uint QQID
        {
            get
            {
                return qqID;
            }
            set
            {
                qqID = value;
            }
        }

        internal static readonly byte TAssignMode = 32;
        private AssignModeEnum assignMode;
        public AssignModeEnum AssignMode
        {
            get
            {
                return assignMode; 
            }
            set
            {
                assignMode = value; 
            }
        }

        internal static readonly byte TKefuID = 33;
        private ushort kefuID;
        public ushort KefuID
        {
            get
            {
                return kefuID;
            }
            set
            {
                if (assignMode == AssignModeEnum.Kefu && value == 0) throw new ArgumentException("此分配模式必须指定客服工号", "KefuID");
                kefuID = value;
            }
        }

        internal static readonly byte TGroupID = 34;
        private ushort groupID;
        public ushort GroupID
        {
            get
            {
                return groupID;
            }
            set
            {
                if (assignMode == AssignModeEnum.Group && value == 0) throw new ArgumentException("此分配模式必须指定客服分组", "GroupID");
                groupID = value;
            }
        }  
    }
}
